<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<?php
/**
 * Created by PhpStorm.
 * User: dapeng
 * Date: 2019-12-05
 * Time: 15:56
 */

//-----------------------绝对值 abc--------------------------
dump( abs(-102.123));//102

//-----------------------四舍五入 round --------------------------
dump( round(-102.123) );//-102

//-----------------------向上取整 ceil --------------------------
dump( ceil(102.123) );//103

//-----------------------向下取整 floor --------------------------
dump( floor(102.123));//102

//-----------------------最大值 max --------------------------
$nums = [1,128,49,20,5,2];
dump(max($nums));//128

//-----------------------最小值 min --------------------------
$nums = [1,128,49,20,-5,2];
dump(min($nums));//-5

//-----------------------随机数 rand --------------------------
rand(10,100);//随机数 10~100以内的随机数





/**
 * 输出内容函数
 * @param $str
 */
function dump($str){
    echo "<p>";
    var_dump($str);
    echo "</p>";
    echo "<br/>";
}